home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
boot
/
czesc_2
/
snap
/
rexx.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-04
|
863b
|
50 lines
/* Auto: make
*/
#include "Snap.h"
#include "proto/MinRexx.h"
#include "minrexx.h"
IMPORT struct SnapRsrc *SnapRsrc;
VOID rexxprepend(), rexxappend();
int disp( register struct RexxMsg *msg, register struct rexxCommandList *dat, char *p);
struct rexxCommandList rcl[] =
{
{"prepend", (APTR) & rexxprepend},
{"append", (APTR) & rexxappend},
{NULL, NULL}
};
char result[17];
int disp( register struct RexxMsg *msg, register struct rexxCommandList *dat, char *p)
{
result[0] = '\0';
((int (*)())(dat->userdata)) (msg, p);
replyRexxCmd(msg, 0L, 0L, &result[0]);
return 1;
}
VOID pend( char *addr, char *p)
{
strcpy(&result[0], addr);
if (*p)
{
strncpy(addr, p + 1, 16);
}
}
VOID rexxprepend( struct RexxMsg *msg, char *p)
{
pend(&SnapRsrc->Prepend[0], p);
}
VOID rexxappend( struct RexxMsg *msg, char *p)
{
pend(&SnapRsrc->Append[0], p);
}